package club.emergency.wechat.model.authorization;

import club.emergency.wechat.model.GenericEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author jifujun
 * @since 2019-03-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class AuthorizationHasRole extends GenericEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 权限id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long authorizationId;

    /**
     * 角色id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long roleId;

    /**
     * 自动迁移算法slot,禁止修改
     */
    @TableField(exist = false)
    private Integer slot;

}
